import Vue from 'vue'
import VueRouter from 'vue-router'
import Main from '../views/Main.vue'
import Home from '../views/Home.vue'
import Active from '../views/active.vue'
import Ss from '../views/Ss.vue'
import Gl from '../views/Gl.vue'
import HV from '../views/HeroView.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    component: Main,
    children: [                         //children 的内容在nav里面显示
      {
        path: '/',                     //首页
        name: 'home',
        component: Home,
      },
      { path: '/active/:id', name: 'newmore', component: Active,props:true },
      { path: '/gl', name: 'Gl', component: Gl },
      { path: '/ss', name: 'Ss', component: Ss },
      
    ]
  },
  { path: '/hero/:id', name: 'HeroView', component: HV,props:true },
]

const router = new VueRouter({
  routes
})

export default router
